<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:dt="http://java.sun.com/jsf/composite/components"
                xmlns:p="http://primefaces.org/ui"
                template="./template1.xhtml">
    
    <ui:define name="mainContent">
        <h2>Fantasy Leagues</h2>
        <ul id="games">
                <h:panelGrid id="fullLeagues" >
                <ui:repeat value="#{accountsBean.fullLeagues}" var="fullLeague">
                    <li>
                        <h4><p:commandLink value="#{fullLeague}" action="#{accountsBean.leagueRedirect}" >
                        <f:setPropertyActionListener target="#{accountsBean.activeTeam}" value="#{fullLeague}" />
                        </p:commandLink></h4>
                    <p>
                        <i>#{accountsBean.activeLeagueTeam}</i><br/>
                        #{accountsBean.activeLeagueType}
                    </p>
                    </li>
                </ui:repeat>
                </h:panelGrid>
        </ul>
        <ul>
            <h2>Invitations</h2>
            <h:panelGrid id="partialLeagues" >
                <ui:repeat value="#{accountsBean.partialLeagues}" var="partialLeague" >
                    <li>
                        <h4><p:commandLink value="#{partialLeague}" action="#{accountsBean.leagueRedirect}" >
                        <f:setPropertyActionListener target="#{accountsBean.activeTeam}" value="#{partialLeague}" />
                        </p:commandLink></h4>
                        <p>
                            <i>#{accountsBean.activeLeagueTeam}</i><br/>
                            #{accountsBean.activeLeagueType}
                        </p>
                    </li>
                </ui:repeat>
            </h:panelGrid>
        </ul>
    </ui:define>
    
    <ui:define name="secondaryContent">
        <h3>Options</h3>
        <p><a href="creation.xhtml">
        <h4>Create a League</h4></a>
        </p>
    </ui:define>
</ui:composition>
